package com.ruoyi.com.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.com.domain.ComDepartment;
import com.ruoyi.com.domain.vo.DepartmentRoleDto;
import com.ruoyi.common.core.domain.OperateBasicForm;


import java.util.List;

/**
 * 公共部门Service接口
 *
 * @author sunye
 * @date 2024-09-29
 */
public interface IComDepartmentService extends IService<ComDepartment>
{
    /**
     * 查询公共部门
     *
     * @param departmentId 公共部门主键
     * @return 公共部门
     */
    public ComDepartment selectComDepartmentByDepartmentId(Long departmentId);

    /**
     * 查询公共部门列表
     *
     * @param comDepartment 公共部门
     * @return 公共部门集合
     */
    public List<ComDepartment> selectComDepartmentList(ComDepartment comDepartment);

    /**
     * 新增公共部门
     *
     * @param comDepartment 公共部门
     * @return 结果
     */
    public int insertComDepartment(ComDepartment comDepartment);

    /**
     * 修改公共部门
     *
     * @param comDepartment 公共部门
     * @return 结果
     */
    public int updateComDepartment(ComDepartment comDepartment);

    /**
     * 批量删除公共部门
     *
     * @param departmentIds 需要删除的公共部门主键集合
     * @return 结果
     */
    public int deleteComDepartmentByDepartmentIds(Long[] departmentIds);

    /**
     * 删除公共部门信息
     *
     * @param departmentId 公共部门主键
     * @return 结果
     */
    public int deleteComDepartmentByDepartmentId(Long departmentId);

    /**
     * 置为有效/无效公共部门
     *
     */
    int effectiveStatus(OperateBasicForm operateBasicForm);

    boolean hasChildByDepartmentId(Long departmentId);

    int bindDepartmentRole(ComDepartment comDepartment);

    List<DepartmentRoleDto> selectDepartmentRole(Long departmentId);
}
